fix: tighten cache implementation constraints - #13268
Conversation
🦋 Changeset detectedLatest commit: 419e2b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 3 changed, 0 removedBuild ID: fe99398cf5f6b14f91f73e18 URL: https://www.apollographql.com/docs/deploy-preview/fe99398cf5f6b14f91f73e18 ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR systematically migrates generic ChangesCache Type Constraint Unification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/core/QueryInfo.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. src/core/types.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. src/react/types/deprecated.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
76dd62f to
4ac68c7
Compare
commit: |
jerelmiller
left a comment
There was a problem hiding this comment.
I could have sworn I updated these. I remember doing so, but I must have git reset --hard by accident or something 🤔. Anyways, thanks for getting the rest!
4ac68c7 to
2e2baf1
Compare
fc43c27 to
419e2b5
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-4.3, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `release-4.3` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `release-4.3`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @apollo/client@4.3.0-alpha.1 ### Patch Changes - [#13268](#13268) [`419e2b5`](419e2b5) Thanks [@DaleSeo](https://github.com/DaleSeo)! - Align the remaining cache generic constraints with `Cache.Implementation`. The deprecated React mutation types (`MutationHookOptions`, `MutationFunctionOptions`, `MutationTuple`) and the internal `InternalRefetchQueriesOptions` and `QueryInfo` types still constrained their cache type parameter to `ApolloCache`, so they now match the rest of the overridable cache API. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
As a quick follow-up to PR #13250, this fixes some cache override typing paths that still allowed
ApolloCache, while the public mutation and refetch APIs now expectCache.Implementation. Keeping these constraints aligned ensures that user-declared cache overrides work consistently throughQueryInfo, internal refetch options, and deprecated React mutation aliases. We also regenerated the API reports so that the published type surface shows the corrected constraints.Summary by CodeRabbit